package org.example.exception;


import org.example.result.StateCode;

/**
 * 服务端内部异常
 */
public class ServerException extends AbstractException {

    public ServerException() {
        super();
    }

    public ServerException(String errorMessage) {
        super(errorMessage, null);
    }

    public ServerException(StateCode stateCode) {
        super(stateCode.message(), stateCode.code());

    }

    public ServerException(String errorMessage, String errorCode) {
        super(errorMessage, errorCode);
    }

    public ServerException(String errorMessage, Throwable throwable, StateCode stateCode) {
        super(errorMessage, throwable, stateCode);
    }

    public ServerException(Throwable throwable) {
        super(throwable);
    }
}
